package view;

import java.io.IOException;

/**
 * description: 运行此类，用户控制类
 * author: 时间
 * time: 2022-01-11-16:05
 */
public class ViewRun {
    // 用于退出程序
    public static boolean flag = true;
    // 用于确定用户是否有输入-1
    public static boolean flag1 = true;
    // 用于选择进入哪个界面
    // 0:登录界面， 1:用户主界面， 2:管理界面， 3~5:预约界面， 6:我的信息界面
    public static int flags = 0;

    public static void main(String[] args) throws IOException {
        MainView mainView = new MainView();
        LoginView loginView = new LoginView();
        AdministratorView administratorView = new AdministratorView();
        OrderView orderView = new OrderView();
        MyInformationView myInformationView = new MyInformationView();
        HistoryView historyView = new HistoryView();
        ListView listView = new ListView();

        while (flag){
            if (flags == 0){
                loginView.views();
            }else if (flags == 1){
                mainView.views();
            }else if (flags == 2){
                administratorView.views();
            }else if (flags == 3 || flags == 4 || flags == 5){
                orderView.views();
            }else if (flags == 6){
                myInformationView.views();
            }else if (flags == 7){
                historyView.views();
            }else if (flags == 8){
                listView.views();
            }
        }
    }
}
